package cn.imnaer.service.rest.view.model;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.BeanUtils;

import cn.imnaer.service.persistence.model.City;
import cn.imnaer.service.persistence.model.Scenic;
import cn.imnaer.service.persistence.model.ScenicImageInfo;

public class ScenicDetailView {
	private String scenicId;
	private  boolean  isCollect;
	private String scenicName;
	private String countryCode;
	private String countryName;
	private String stateCode;
	private String stateName;
	private String cityCode; // 城市电话区号编码
	private String cityName; // 城市名字
	private double latitude;
	private double longitude;
	private List<String> images=new ArrayList<>(); //这个景点的照片
	private int  score; //此score是此地点的平均分
	private int commentCount = 0;//评论数
	private int collectCount = 0; //收藏数
	private String type;
	private String introduction; //描述(几个字描述)
	private  String  traffic;
	private List<ScenicContributionView> contributionViews=new ArrayList<>();
	private String  contributeUserId;
	private String  contributeUserName;
	public String getContributeUserId() {
		return contributeUserId;
	}
	public void setContributeUserId(String contributeUserId) {
		this.contributeUserId = contributeUserId;
	}
	public String getContributeUserName() {
		return contributeUserName;
	}
	public void setContributeUserName(String contributeUserName) {
		this.contributeUserName = contributeUserName;
	}
    public String getScenicId() {
		return scenicId;
	}
	public void setScenicId(String scenicId) {
		this.scenicId = scenicId;
	}
	public boolean getIsCollect() {
		return isCollect;
	}
	public void setIsCollect(boolean isCollect) {
		this.isCollect = isCollect;
	}
	public String getScenicName() {
		return scenicName;
	}
	public void setScenicName(String scenicName) {
		this.scenicName = scenicName;
	}
	public double getLatitude() {
		return latitude;
	}
	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}
	public double getLongitude() {
		return longitude;
	}
	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}
	public List<String> getImages() {
		return images;
	}
	public void setImages(List<String> images) {
		this.images = images;
	}
	public int getScore() {
		return score;
	}
	public void setScore(int score) {
		this.score = score;
	}
	public int getCommentCount() {
		return commentCount;
	}
	public void setCommentCount(int commentCount) {
		this.commentCount = commentCount;
	}
	public int getCollectCount() {
		return collectCount;
	}
	public void setCollectCount(int collectCount) {
		this.collectCount = collectCount;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getIntroduction() {
		return introduction;
	}
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	public String getTraffic() {
		return traffic;
	}
	public void setTraffic(String traffic) {
		this.traffic = traffic;
	}
	public List<ScenicContributionView> getContributionViews() {
		return contributionViews;
	}
	public void setContributionViews(List<ScenicContributionView> contributionViews) {
		this.contributionViews = contributionViews;
	}
	public String getCountryCode() {
		return countryCode;
	}
	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}
	public String getCountryName() {
		return countryName;
	}
	public void setCountryName(String countryName) {
		this.countryName = countryName;
	}
	public String getStateCode() {
		return stateCode;
	}
	public void setStateCode(String stateCode) {
		this.stateCode = stateCode;
	}
	public String getStateName() {
		return stateName;
	}
	public void setStateName(String stateName) {
		this.stateName = stateName;
	}
	public String getCityCode() {
		return cityCode;
	}
	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}
	public String getCityName() {
		return cityName;
	}
	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	public  static  ScenicDetailView   valueOf(Scenic  scenic){
		ScenicDetailView  view=new ScenicDetailView();
		BeanUtils.copyProperties(scenic, view);
		City  city=scenic.getCity();
		view.setCityCode(city.getCityCode());
		view.setCityName(city.getCityName());
		view.setStateCode(city.getStateCode());
		view.setStateName(city.getStateName());
		return view;
	}
	
}
